<div class="dailyCheck main">
	<div class="pa-form-container shadowbox">
		<div class="container-header">日常巡查</div>
		<div class="pa-form-content">
			<form class="clear">
				<div class="row">
					<div class="pa-form-control fl">
						<label>检查情况：</label>
						<select name="problem" id="problem"
							ng-model="dailyCheck.userInfo.dealType">
							<option value=""></option>
							<option value="0">无问题</option>
							<option value="1">限期整改</option>
							<option value="2">责令停工</option>
						</select>
					</div>
					<div class="pa-form-control fl">
						<label>所在标段：</label>
						<select id="type" name="type"
							ng-model="dailyCheck.userInfo.bidId">
              <option value=""></option>
              <option ng-repeat ="item in dailyCheck.sectionList"
                value="{{item.bidId}}">{{item.bidName}}</option>
            </select>
					</div>
					<div class="pa-form-control fl">
						<label>是否整改完成：</label>
						<select name="isProblem"
							ng-model="dailyCheck.userInfo.problemStatus">
							<option value=""></option>
							<option value="2">是</option>
							<option value="3">否</option>
						</select>
					</div>
					<div class="pa-form-control fl">
						<label>发现时间：</label>
						<input id="type" name="type" type="text" ng-datepicker
							ng-model="dailyCheck.userInfo.problemFoundTime">
					</div>
				</div>
				<a class="pa-float-btn reset-btn"
					ng-click="dailyCheck.reset()">
					<i class="fa fa-repeat"></i>
					<span class="ml5">重置</span>
				</a>
				<a class="pa-float-btn pa-btn"
					ng-click="dailyCheck.query()">
					<i class="fa fa-search"></i>
					<span class="ml5">查询</span>
				</a>
			</form>
		</div>
	</div>
	<div class="pa-table-container shadowbox">
		<div class="table-outer" style="margin-top: 14px;">
			<form class="base-info">
				<table class="pa-table">
					<thead>
						<tr>
							<th>所在标段</th>
							<th>巡查名称</th>
							<th class="time-sequence">
								<div>发现时间</div>
								<div class="time-sequence-btn">
								  <div class="time-sequence-box"
								    ng-click="dailyCheck.up('problem_found_time','0')">
								    <i class="fa fa-caret-up"></i>
								  </div>
								  <div class="time-sequence-box"
								    ng-click="dailyCheck.up('problem_found_time','1')">
								    <i class="fa fa-caret-down"></i>
								  </div> 
								</div>
							</th>
							<th>检查情况</th>
							<th class="time-sequence">
								<div>整改截止日期</div>
								<div class="time-sequence-btn">
								  <div class="time-sequence-box"
								    ng-click="dailyCheck.up('problem_deadline','0')">
								    <i class="fa fa-caret-up"></i>
								  </div>
								  <div class="time-sequence-box"
								    ng-click="dailyCheck.up('problem_deadline','1')">
								    <i class="fa fa-caret-down"></i>
								  </div> 
								</div>
							</th>
							<th>问题说明</th>
							<th>状态</th>
							<th>操作</th>
						</tr>
					</thead>
					<tbody>
						<tr ng-repeat="item in dailyCheck.dailyCheckList">
							<td>{{item.bidName}}</td>
							<td>{{item.problemName}}</td>
							<td>{{item.problemFoundTime1}}</td>
							<td>{{item.dealType == 0 ? '无问题' :
							item.dealType == 1 ? '限期整改' : 
							item.dealType == 2 ? '责令停工' :''}}</td>
							<td>{{item.problemDeadline1}}</td>
							<td>{{item.problemDescription}}</td>
 							<td
 								ng-class="{'nostart': item.problemStatus == '0',
 								'ongoing': item.problemStatus == '1',
              	'has-complete': item.problemStatus == '2'}">
	              {{item.problemStatus == 2 ? '已完成' : 
	              	item.problemStatus == 1 ? '待审核' :
	 								item.problemStatus == 0 ? '待整改' : ''}}
							</td>
							<td>
								<div class="del"
									authorization-btn="api/securityActivities/checkProblem/queryCheckProblemById"
									ng-click="$state.go('rectificationDetail',{id:item.problemId})">
									<i class="fa fa-street-view color"></i>
									<span>查看</span>									
								</div>
								<div class="del"
									authorization-btn="api/securityactivities/DailyCheckProblem/deleteDailyCheck"
									ng-click="dailyCheck.deleteDailyCheck(item.problemId)">
									<i class="fa fa-trash color"></i>
									<span>删除</span>
								</div>									
							</td>
						</tr>
					</tbody>
				</table>
			</form>				
			<div class="total-num">
			  共计<span class="total-num-colorful">
			  {{dailyCheck.paginationData.total}}</span>条
			</div>
			<!-- 分页 -->
      <div class="pagination-outer">
        <uib-pagination
          total-items="dailyCheck.paginationData.total"
          ng-model="dailyCheck.paginationData.pageNum"
          items-per-page="dailyCheck.paginationData.pageSize"
          ng-change="pageChange()"
          class="pagination-sm"
          boundary-link-numbers="true"
          max-size="5"
          next-text="下一页"
          previous-text="上一页"></uib-pagination>
		</div>
	</div>
</div>